package com.ruoyi.extend.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.db.mapper.ChannleUnionAddupMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.db.domain.ChannleUnionAddup;
import com.ruoyi.extend.service.IChannleUnionAddupService;
import com.ruoyi.common.core.text.Convert;

/**
 * 联登统计Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-06-09
 */
@Service
@DataSource(DataSourceType.SLAVE)
public class ChannleUnionAddupServiceImpl implements IChannleUnionAddupService 
{
    @Autowired
    private ChannleUnionAddupMapper channleUnionAddupMapper;

    /**
     * 查询联登统计
     * 
     * @param id 联登统计主键
     * @return 联登统计
     */
    @Override
    public ChannleUnionAddup selectChannleUnionAddupById(Long id)
    {
        return channleUnionAddupMapper.selectChannleUnionAddupById(id);
    }

    /**
     * 查询联登统计列表
     * 
     * @param channleUnionAddup 联登统计
     * @return 联登统计
     */
    @Override
    public List<ChannleUnionAddup> selectChannleUnionAddupList(ChannleUnionAddup channleUnionAddup)
    {
        return channleUnionAddupMapper.selectChannleUnionAddupList(channleUnionAddup);
    }

    /**
     * 查询联登统计列表
     *
     * @param channleUnionAddup 联登统计
     * @return 联登统计
     */
    @Override
    public List<Map<String, Object>> selectChannleUnionAddupListMap(ChannleUnionAddup channleUnionAddup)
    {
        return channleUnionAddupMapper.selectChannleUnionAddupListMap(channleUnionAddup);
    }

    /**
     * 新增联登统计
     * 
     * @param channleUnionAddup 联登统计
     * @return 结果
     */
    @Override
    public int insertChannleUnionAddup(ChannleUnionAddup channleUnionAddup)
    {
        channleUnionAddup.setCreateTime(DateUtils.getNowDate());
        return channleUnionAddupMapper.insertChannleUnionAddup(channleUnionAddup);
    }

    /**
     * 修改联登统计
     * 
     * @param channleUnionAddup 联登统计
     * @return 结果
     */
    @Override
    public int updateChannleUnionAddup(ChannleUnionAddup channleUnionAddup)
    {
        channleUnionAddup.setUpdateTime(DateUtils.getNowDate());
        return channleUnionAddupMapper.updateChannleUnionAddup(channleUnionAddup);
    }

    /**
     * 批量删除联登统计
     * 
     * @param ids 需要删除的联登统计主键
     * @return 结果
     */
    @Override
    public int deleteChannleUnionAddupByIds(String ids)
    {
        return channleUnionAddupMapper.deleteChannleUnionAddupByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除联登统计信息
     * 
     * @param id 联登统计主键
     * @return 结果
     */
    @Override
    public int deleteChannleUnionAddupById(Long id)
    {
        return channleUnionAddupMapper.deleteChannleUnionAddupById(id);
    }
}
